import api from "@/libs/request";

/**
 * 获取结算查询
 */
export const getAssIncentive = (data: any) => {
  return api.get("/finance/manage/setting", data);
};

/**
 * 编辑结算设置
 */
export const setAssIncentive = (data: any) => {
  return api.post("/finance/manage/setting", data);
};


/**
 * 获取对账单
 */
export const getFinTrade = (data: any) => {
  return api.get("/finance/manage/trade", data);
};

/**
 * 获取对账单流水
 */
export const getWaterRecode = (data: any) => {
  return api.get("/finance/manage/trade/detail", data);
};
/*
 * 获取提现列表
 * @param data
 * auditStatus 0->合伙人待审核；1->总店待审核(审核中)；2->已通过；3->已拒绝
 */
export const getWithdrawalList = (data: any) => {
  return api.get("/finance/manage/withdrawal", data);
};


/**
 * 获取单条提现详情
 */
export const getWithdrawalDetail = (data: any) => {
  return api.get("/finance/manage/withdrawal/info/" + data.id, data);
};

/**
 * 通过提现
 */
export const pass = (data: any) => {
  return api.put("/finance/manage/withdrawal/pass", null, { params: data });
};

/**
 * 拒绝提现
 */
export const reject = (data: any) => {
  return api.put("/finance/manage/withdrawal/reject", null, { params: data });
};

/**
 * 批量备注
 */
export const bulkNote = (ids: any, note, over) => {
  return api.put("/finance/manage/withdrawal/note", ids, {
    params: { note, over },
  });
};


/**
 * 获取结算设置
 * @param data
 */
export const getManageSetting = () => {
  return api.get("/finance/manage/setting", null);
};

/**
 * 设置结算设置
 * @param data
 */
export const setManageSetting = (data: any) => {
  return api.post("/finance/manage/setting", data);
};

/**
 * 获取订单设置
 * @param data
 */
export const getOrderSetting = () => {
  return api.get("/finance/manage/setting/order", null);
};

/**
 * 设置订单设置
 * @param data
 */
export const setOrderSetting = (data: any) => {
  return api.post("/finance/manage/setting/order", data);
};

/**
 * 快递设置
 */
export const logisticsSetting = (data: any) => {
  return api.post("/finance/manage/setting/kd", data);
};

/**
 * 查询快递设置
 */
export const getLogisticsSetting = (data: any) => {
  return api.get("/finance/manage/setting/kd", data);
};

/**
 * 获取激励
 * @param id
 */
export const getIncentiveOrder = (data: any) => {
  return api.get("order/manage/incentive/search", data);
};

/**
 * 根据租户id获取店铺当前使用的套餐功能状态（直播 提货点 权限）
 */
export const getShopFunction = (params: any) => {
  return api.get("/platform/shop/get/shop/function", params);
};
